package day04;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/11
 */
public class PoemChanged {
    public static void main(String[] args) {

        char[][] originPoem = {
                {'床', '前', '明', '月', '光', '，'},
                {'疑', '是', '地', '上', '霜', '，'},
                {'举', '头', '望', '明', '月', '，'},
                {'低', '头', '思', '故', '乡', '。'}
        };

        char[][] changedPoem = new char[6][4];
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 4; j++) {
                changedPoem[i][3-j] = originPoem[j][i]; // 原列变新行，元素倒放
            }
        }

        System.out.println("转变成:");
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 4; j++) {
                System.out.print(changedPoem[i][j]);
            }
            System.out.println();
        }
    }
}